An OutputStream
handles byte data.
OutputStream is an abstract class from which all
byte-oriented output streams are derived.
Its descendant classes are used for general-purpose
(non-character output).
These streams are aimed at
writing groups of 8-bit bytes to output destinations.
The bytes are in the same format as Java primitive types.
For example,
4-byte groups corresponding to type int
can
be written to a disk file.
We will mostly be interested in FileOutputStream
and DataOutputStream
.
We have used PrintStream
many times already,
because System.out
is an object of that type.